---
layout: m1x_soap
title: Address List
---

<h2><a name="customer_address.list-Module%3AMageCustomer"></a>Module: Mage_Customer</h2>


<h3><a name="customer_address.list-Resource%3Acustomeraddress"></a>Resource: customer_address</h3>


<h4><a name="customer_address.list-Method%3A"></a>Method:</h4>

<ul>
	<li>customer_address.list (SOAP V1)</li>
	<li>customerAddressList (SOAP V2)</li>
</ul>


<p>Retrieve the list of customer addresses.</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> int </td>
<td> customerId </td>
<td> Customer ID </td>
</tr>
</tbody></table>


<p><b>Returns:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> array </td>
<td> result </td>
<td> Array of customerAddressEntity </td>
</tr>
</tbody></table>


<p>The <b>customerAddressEntity</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> int </td>
<td> customer_address_id <br class="atl-forced-newline" /> </td>
<td> ID of the customer address </td>
</tr>
<tr>
<td> string </td>
<td> created_at <br class="atl-forced-newline" /> </td>
<td> Date when the address was created </td>
</tr>
<tr>
<td> string </td>
<td> updated_at <br class="atl-forced-newline" /> </td>
<td> Date when the address was updated </td>
</tr>
<tr>
<td> string </td>
<td> increment_id <br class="atl-forced-newline" /> </td>
<td> Increment ID </td>
</tr>
<tr>
<td> string </td>
<td> city <br class="atl-forced-newline" /> </td>
<td> City </td>
</tr>
<tr>
<td> string </td>
<td> company <br class="atl-forced-newline" /> </td>
<td> Name of the company </td>
</tr>
<tr>
<td> string </td>
<td> country_id <br class="atl-forced-newline" /> </td>
<td> ID of the country </td>
</tr>
<tr>
<td> string </td>
<td> fax <br class="atl-forced-newline" /> </td>
<td> Fax </td>
</tr>
<tr>
<td> string </td>
<td> firstname <br class="atl-forced-newline" /> </td>
<td> Customer first name </td>
</tr>
<tr>
<td> string </td>
<td> lastname <br class="atl-forced-newline" /> </td>
<td> Customer last name </td>
</tr>
<tr>
<td> string </td>
<td> middlename <br class="atl-forced-newline" /> </td>
<td> Customer middle name </td>
</tr>
<tr>
<td> string </td>
<td> postcode <br class="atl-forced-newline" /> </td>
<td> Customer postcode </td>
</tr>
<tr>
<td> string </td>
<td> prefix <br class="atl-forced-newline" /> </td>
<td> Customer prefix </td>
</tr>
<tr>
<td> string </td>
<td> region <br class="atl-forced-newline" /> </td>
<td> Name of the region </td>
</tr>
<tr>
<td> int </td>
<td> region_id <br class="atl-forced-newline" /> </td>
<td> Region ID </td>
</tr>
<tr>
<td> string </td>
<td> street <br class="atl-forced-newline" /> </td>
<td> Name of the street </td>
</tr>
<tr>
<td> string </td>
<td> suffix <br class="atl-forced-newline" /> </td>
<td> Customer suffix </td>
</tr>
<tr>
<td> string </td>
<td> telephone <br class="atl-forced-newline" /> </td>
<td> Telephone number </td>
</tr>
<tr>
<td> boolean </td>
<td> is_default_billing <br class="atl-forced-newline" /> </td>
<td> True if the address is the default one for billing </td>
</tr>
<tr>
<td> boolean </td>
<td> is_default_shipping <br class="atl-forced-newline" /> </td>
<td> True if the address is the default one for shipping </td>
</tr>
</tbody></table>


<h4><a name="customer_address.list-Examples"></a>Examples</h4>

<h5><a name="customer_address.list-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$client = new SoapClient('http://magentohost/api/soap/?wsdl');

// If somestuff requires API authentication,
// then get a session token
$session = $client-&gt;login('apiUser', 'apiKey');

$result = $client-&gt;call($session, 'customer_address.list', '2');
var_dump($result);

// If you don't need the session anymore
//$client-&gt;endSession($session);</pre>
		</div>
</div></div>


<h5><a name="customer_address.list-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); // TODO : change login and pwd if necessary

$result = $proxy-&gt;customerAddressList($sessionId, '2');
var_dump($result);</pre>
		</div>
</div></div>


<h5><a name="customer_address.list-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey')); 
 
$result = $proxy-&gt;customerAddressList((object)array('sessionId' =&gt; $sessionId-&gt;result, 'customerId' =&gt; '2'));   
var_dump($result-&gt;result);</pre>
		</div>
</div></div>


<h5><a name="customer_address.list-ResponseExampleSOAPV1"></a>Response Example SOAP V1</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div>
		<pre class="theme: Default; brush: php; gutter: false">array
  0 =&gt;
    array
      'customer_address_id' =&gt; string '2' (length=1)
      'created_at' =&gt; string '2012-03-29 13:20:08' (length=19)
      'updated_at' =&gt; string '2012-03-29 13:39:29' (length=19)
      'city' =&gt; string 'Las Vegas' (length=9)
      'country_id' =&gt; string 'US' (length=2)
      'firstname' =&gt; string 'johny' (length=5)
      'lastname' =&gt; string 'doe' (length=3)
      'postcode' =&gt; string '89032' (length=5)
      'region' =&gt; string 'Nevada' (length=6)
      'region_id' =&gt; string '39' (length=2)
      'street' =&gt; string '3406 Hiney Road' (length=15)
      'telephone' =&gt; string '702-283-9556' (length=12)
      'is_default_billing' =&gt; boolean false
      'is_default_shipping' =&gt; boolean true
  1 =&gt;
    array
      'customer_address_id' =&gt; string '3' (length=1)
      'created_at' =&gt; string '2012-03-29 13:39:29' (length=19)
      'updated_at' =&gt; string '2012-03-29 13:39:29' (length=19)
      'city' =&gt; string 'Corpus Christi' (length=14)
      'country_id' =&gt; string 'US' (length=2)
      'firstname' =&gt; string 'johny' (length=5)
      'lastname' =&gt; string 'doe' (length=3)
      'postcode' =&gt; string '78476' (length=5)
      'region' =&gt; string 'Texas' (length=5)
      'region_id' =&gt; string '57' (length=2)
      'street' =&gt; string '3672 Boone Street' (length=17)
      'telephone' =&gt; string '361-280-8488' (length=12)
      'vat_id' =&gt; string 'GB999 9999 73' (length=13)
      'is_default_billing' =&gt; boolean false
      'is_default_shipping' =&gt; boolean false</pre>
		</div>
</div></div>


